﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using YJ.JobService.Jobs;

namespace YJ.JobService
{
    public partial class ShowJobDes : Form
    {
        private string des;
        public ShowJobDes(Point location, ReflectionJob job)
        {
            InitializeComponent();
            this.Location = location;

            this.des += "任务Key:" + job.JobKey + "\r\n";
            this.des += "任务名称:" + job.JobName + "\r\n";
            this.des += "程序集:" + job.AssemblyPath + "\r\n";
            this.des += "程序目录:" + job.ApplicationDirectory + "\r\n";
            this.des += "类命名空间:" + job.ClassNameSpace + "\r\n";
            this.des += "方法名称:" + job.MethodName + "\r\n";
            this.des += "任务描述:" + job.Description;
        }

        public ShowJobDes(Point location, WinServices job)
        {
            InitializeComponent();
            this.Location = location;

            this.des += "服务包含Key:" + job.JobKeys.Join(",") + "\r\n";
            this.des += "windows服务名称:" + job.ServiceName + "\r\n";
            this.des += "服务安装路径:" + job.ServiceExePath;
        }

        private void ShowJobDes_Load(object sender, EventArgs e)
        {
            this.txtDes.Text = des;
        }
    }
}
